<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // console.log(a); //undefined
        // var a=3;
        // b=6;
        // console.log(window.a);//3
        // console.log("a" in window);//true
        // console.log(window.b);//6
        // console.log("b" in window);//true
        // delete window.a;//var 不可删除
        // delete window.b;//不带var 可删除

        // console.log(window);

        // var obj={"name":"lili"}; 
        // console.log("name" in obj )// true  说明name就是obj的属性
        // console.log("age" in obj)//false    说明age 不是obj的属性


        // console.log(b);//报错
        // function fn(){
        //     b=13;
        //     console.log(b);
        // }
        // fn();
        // console.log(b);


        console.log(a,b);
        var a=12,
        b=12;
        function fn(){
            console.log(a,b);
            var a=b=13;
            console.log(a,b);
        }
        fn();
        console.log(a,b);




    </script>
</body>
</html>